ui_dial( x * 2, y, x * 14, y * 6, WHITE, BLACK, BLACK,
TRUE, "A Test Dialog Box",
"Please enter the name of your favorite saint \n(may be Orthodox or Catholic). No Anglicans accepted, or even Protestant or Evangelical Saints. Thanks very much for your help.",
"Your saint: ", d_buf, &d_box );
sprintf( ui_tbuf, "Saint selected: %s ", d_buf );
ui_wtitle( d_box, ui_tbuf );
ui_wait();
}
yes_no()
{
int x, y, r;
x = ui_grwind->xmax / 20;
y = ui_grwind->ymax / 10;
r = ui_yn( x * 2, y, x * 14, y * 6, WHITE, BLACK, BLACK, TRUE,
"Do you want $ 1,000,000.00 in cash?", " NO ", " YES ",
&d_box );
}
test_alarm()
{
int x, y, r;
x = ui_grwind->xmax / 20;
y = ui_grwind->ymax / 10;
r = ui_alarm( x * 2, y, x * 14, y * 6, WHITE, BLACK, BLACK, TRUE,
"An alarm box like this would be used in case of a serious program or system problem.",
" OK ",
&d_box );
}
ui_poll()
{
/* ui_clock(); */
}
bw_error( s )
char *s;
{
char buf[ BW_EBUFSIZE ];
sprintf( buf, "ERROR: %s ", s );
gr_text( GR_PRIMARY, 5, 5, buf, BLACK, WHITE );
ui_wait();
}
#ifdef DEBUG
bw_debug( s )
char *s;
{
char buf[ BW_EBUFSIZE ];
sprintf( buf, "DEBUG: %s ", s );
gr_text( GR_PRIMARY, 5, 5, buf, BLACK, WHITE );
ui_wait();
}
#endif
bw_message( s )
char *s;
{
char buf[ BW_EBUFSIZE ];
sprintf( buf, "MESSAGE: %s ", s );
gr_text( GR_PRIMARY, 5, 5, buf, BLACK, WHITE );
}
text_file()
{
static struct menu_box m_box;
int x, y, item;
register int c, test;
x = ui_grwind->xmax / 20;
y = ui_grwind->ymax / 10;
m_box.is_drawn = FALSE;
item = ui_ftext( x * 2, y * 2, x * 14, y * 7, dr_all, "File Selector Test",
&m_box, d_titles, d_entries, MAXENTRIES, WHITE, BLACK, WHITE );
if ( ( c != TK_ERROR ) && ( c != TK_EXIT ))
{
sprintf( ui_tbuf, "File selected: %s ",
d_entries[ item ]->filename );
ui_wtitle( m_box.window, ui_tbuf );
ui_wait();
}
}
icon_file()
{
static struct menu_box m_box;
int x, y, item;
x = ui_grwind->xmax / 20;
y = ui_grwind->ymax / 10;
m_box.is_drawn = FALSE;
item = ui_ficon( x * 3, y * 2, x * 13, y * 9, dr_all, "TEST: ui_ficon() ",
&m_box, d_entries, MAXENTRIES, WHITE, BLACK, WHITE );
if ( ( item != TK_ERROR ) && ( item != TK_EXIT ))
{
sprintf( ui_tbuf, "File selected: %s ",
d_entries[ item ]->filename );
ui_wtitle( m_box.window, ui_tbuf );
ui_wait();
}
}
pixmap()
{
static struct pbm_struct pmstruct;
int x, y;
x = ui_grwind->xmax / 20;
y = ui_grwind->ymax / 10;
ui_pbmread( "test.pbm", &pmstruct, WHITE, BLACK );
ui_pbmshow( GR_PRIMARY, x * 2, y * 2, &pmstruct );